Distributed safe data commit in a data storage system

ABSTRACT

In one embodiment, a safe data commit process manages the allocation of task control blocks (TCBs) as a function of the type of task control block (TCB) to be allocated for destaging and as a function of the identity of the RAID storage rank to which the data is being destaged. For example, the allocation of background TCBs is prioritized over the allocation of foreground TCBs for destage operations. In addition, the number of background TCBs allocated to any one RAID storage rank is limited. Once the limit of background TCBs for a particular RAID storage rank is reached, the distributed safe data commit logic switches to allocating foreground TCBs. Further, the number of foreground TCBs allocated to any one RAID storage rank is also limited. Other features and aspects may be realized, depending upon the particular application.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a computer program product, system, andmethod for distributed safe data commit in data storage systems.

2. Description of the Related Art

A storage controller may control a plurality of storage devices that mayinclude hard disks, tapes, etc. A cache may also be maintained by thestorage controller, where the cache may comprise a high speed storagethat is accessible more quickly in comparison to certain other storagedevices, such as, hard disks, tapes, etc. However, the total amount ofstorage capacity of the cache may be relatively small by comparison tothe storage capacity of certain other storage devices, such as, harddisks, etc., that are controlled by the storage controller. The cachemay be comprised of one or more of random access memory (RAM),non-volatile storage device (NVS), read cache, write cache, etc., thatmay interoperate with each other in different ways. The NVS may becomprised of a battery backed-up random access memory and may allowwrite operations to be performed at a high speed. The storage controllermay manage Input/Output (I/O) requests from networked hosts to theplurality of storage devices.

Caching techniques implemented by the storage controller assist inhiding I/O latency. The cache may comprise a high speed memory orstorage device used to reduce the effective time required to read datafrom or write data to a lower speed memory or storage device. The cacheis used for rapid access to data staged from external storage to serviceread data access requests, and to provide buffering of modified data.Write requests are written to the cache and then written (i.e.,destaged) to the external storage devices.

NVS was introduced for allowing fast writes. Generally, in the absenceof NVS, data writes may have to be synchronously written (i.e.,destaged) directly to the storage device to ensure consistency,correctness, and persistence. Otherwise failure of the server may causedata stored in the cache to be lost. Generally the rate of host writesexceeds the speed of the storage devices, hence without NVS the rate ofdata transfer to storage devices may be slow. NVS enables fast writes tocache where the writes are mirrored to and stored safely in the NVSuntil the writes can be transferred to the external storage device. Thedata is destaged from cache later (and discarded from NVS) in anasynchronous fashion thus hiding the write latency of the storagedevice. The cache and NVS typically store updates intended for multiplestorage devices. To guarantee continued low latency for writes, the datain the NVS may have to be drained so as to ensure that there is alwayssome empty space for incoming writes; otherwise, follow-on writes maybecome effectively synchronous, which may adversely impact the responsetime for host writes. On the other hand, if the writes are drained tooaggressively, then the benefits of write caching may not be fullyexploited since the average amount of NVS cache utilized may be low.

Task Control Block (TCB) is a task control data structure in theoperating system kernel containing the information needed to manage aparticular process. Storage controllers may move information to and fromstorage devices, and to and from the cache (including the NVS) by usingTCBs to manage the movement of data. When a write request issues from ahost computer to a storage controller, a TCB may be allocated from theoperating system code. The TCB is used to maintain information about thewrite process from beginning to end as data to be written is passed fromthe host computer through the cache to the storage devices. If the cacheis full, the TCB may be queued until existing data in the cache can bedestaged (i.e., written to storage devices), in order to free up space.The destage operations may involve the moving of information from cacheto storage such as a Redundant Array of Independent Disks (RAID) storage“rank” and destage TCBs may be allocated for performing the destageoperations. A RAID storage “rank” is an array of storage devicesconfigured in a RAID configuration to facilitate data recovery in theevent a storage device of the RAID array fails.

TCBs may be classified on the basis of the task being controlled by theparticular TCB. For example, a “background” TCB is a TCB that controlsan operation which is not directly related to a host input/outputoperation. Thus. one example of a background TCB is a TCB which controlsa destage operation as a background operation not required as part of aparticular host I/O operations. Another example of a background TCB is aTCB which controls a prestage of tracks from storage to cache in whichthe prestage operation is being performed as a background operation notrequired as part of a particular host I/O operation. There is typicallya limit imposed on the number of background TCBs that can be allocatedfor background operations directed to a storage rank at any given pointof time depending on the type of storage rank. If a background TCBallocation operation attempts to exceed the limit imposed for aparticular storage rank, the attempted allocation of the background TCBfails. In response to the failure, allocation of a background TCB may beretried.

Another type of TCB is a “foreground” TCB that controls an operationwhich is typically directly related to a host input/output operation.For example, a foreground TCB may be allocated to perform a destage orstage operation on behalf of a host I/O operation. Thus, a cache miss ona host read typically causes a stage operation controlled by aforeground TCB, to stage one or more tracks from storage to cache tosatisfy the host read operation.

In a manner similar to that of background TCBs, there is typically alimit imposed on the number of foreground TCBs that can be allocated toa storage rank at any given point of time depending on the type ofstorage rank. However, if a foreground TCB allocation operation exceedsthe limit imposed for a particular storage rank, the attemptedallocation of the foreground TCB does not fail but instead, theforeground TCB allocation attempt is queued. When a foreground TCB isdeallocated such as upon the completion of a foreground task, theforeground TCB allocation attempt at the head of the queue is allocateda new foreground TCB allocation.

A storage controller typically maintains a cache directory whichidentifies tracks having data stored in the cache as a result of aprestage or stage operation which transfers the data of a track storedin the storage to the cache, or as a result of a host write operationwhich writes data to the cache for subsequent destaging to thecorresponding track or tracks of the storage. Such a cache directory isfrequently implemented in the form a hash table of all tracks in cache.Each track is hashed into a slot of the cache directory which includes atrack identification (ID) and an indication as to whether the data ofthe track is “dirty”, that is, has not yet been safely destaged to thecorresponding track of the storage. Multiple tracks hashed into a slotare linked together.

As previously mentioned, data may be destaged from cache in a backgroundprocess such that at any one particular time, there may be dirty datastored in the cache which has not yet been safely destaged to thestorage. Dirty data to be destaged from cache for a particular RAID rankmay be identified by a background destage process traversing rank basedb-trees. In the event of a power loss or device failure in the cache,data not yet successfully destaged to storage may be lost.

Accordingly, storage controllers frequently employ a safe data commitprocess which scans the cache directory for dirty data to be destaged tosecondary storage. Such a scan of the cache directory may be initiatedon a periodic basis, such as on the hour, for example. Storagecontrollers may note the time when a safe data commit scan is started.When the safe data commit process completes, the safe data commit scanstart time may be displayed in a log. As a consequence, an operator maybe assured that anything written to cache prior to the safe data commitscan start time has been successfully destaged and is safely stored onthe storage. In the event of a data loss, only data that was written tocache after the safe data commit scan start time, may need to berestored. However, a storage controller may exhibit an increase inresponse time for host initiated I/O operations which are initiatedduring a safe data commit process.

In a known safe data commit process, TCBs are allocated to scan thecache directory. The storage controller may reserve a certain number ofTCBs to be allocated for safe data commit process. For a storagecontroller having multiple central processing units (CPUs), the numberof TCBs allocated for the cache directory scan may equal the number ofCPUs of the storage controller.

The cache directory may be subdivided for the safe data commit processso that each CPU is assigned a portion of the cache directory to scanfor dirty data. The tracks represented in each cache directory portionare a function of the particular host input/output operations andbackground operations which caused data to be staged or destaged. Thus,each portion of the cache directory being scanned may represent tracksfrom one or more RAID ranks. Conversely, each RAID rank may have tracksrepresented in one or more cache directory portions of the safe datacommit process.

SUMMARY

One general aspect of distributed safe data commit processes inaccordance with the present description includes distributed safe datacommit logic which manages the allocation of task control datastructures such as task control blocks (TCBs) for the safe data commitprocess as a function of the type of TCB to be allocated for destagingand as a function of the identity of the storage unit, such as a RAIDstorage rank, for example, to which the data is being destaged in aparticular destage operation of the safe data commit process. In oneaspect, the safe data commit logic destages data stored in a cache whichhas not yet been destaged to storage in a manner which can reduce theimpact of safe data commit operations on response times of ongoinginput/output operations of the host, cache and storage. Other aspectsmay be realized depending upon the particular application.

In one aspect of the present description, distributed safe data commitlogic is configured to destage data stored in the cache which has notyet been destaged for storage to an associated subunit of storage, suchas a track, for example, of a unit of storage, such as a RAID storagerank, for example, In one embodiment, the distributed safe data commitlogic includes scan logic configured to identify a subunit of storagefor which there is data stored in cache which has not yet been destagedfor storage to the associated subunit of storage of a unit of storage.The distributed safe data commit logic further includes allocation logicconfigured to identify the unit of storage of the identified subunit ofstorage and to allocate a task control data structure of a first type(such as a background TCB, for example) to destage the data of theidentified subunit of storage to the unit of storage if a total of thetask control data structures of the first type allocated to theidentified unit of storage of the identified subunit of storage remainswithin a limit imposed for a total of task control data structures ofthe first type allocated to the identified unit of storage. Theallocation logic is further configured to allocate a task control datastructure of a second type such as a foreground TCB, for example, todestage the data of the identified subunit of storage to the unit ofstorage if a total of the task control data structures of the first typeallocated to the identified unit of storage of the identified subunit ofstorage has reached the limit imposed for a total of task control datastructures of the first type allocated to the identified unit ofstorage.

In one embodiment, the unit of storage is a RAID array or rank ofstorage devices and the subunit of storage is a track of the RAID rankof storage devices. In another embodiment, the task control datastructure of the first type is a background task control block (TCB) andwhere the task control data structure of the second type is a foregroundtask control block (TCB).

In another aspect, the distributed safe data commit logic furtherincludes destage logic configured to destage data stored in the cache tothe identified subunit of storage of the identified unit of storageusing the allocated task control data structure. In addition, theallocation logic is further configured to deallocate the allocated taskcontrol data structure in association with completion of destaging datastored in the cache to the identified subunit of storage of theidentified unit of storage using the allocated task control datastructure.

In still another aspect, the allocation logic further includes a queuememory configured to store a queue of requests for allocation of taskcontrol data structures of the second type. In addition, the allocationlogic is further configured to place requests for allocation of taskcontrol data structures of the second type in the queue memory to awaitexecution if a total of the task control data structures of the secondtype allocated to the identified unit of storage of the identifiedsubunit of storage has reached a limit imposed for a total of taskcontrol data structures of the second type allocated to the identifiedunit of storage.

In yet another aspect, a storage controller includes a plurality ofprocessing units and the allocation logic is further configured toallocate a plurality of scan task control blocks for the plurality ofprocessing units of the storage controller wherein a total of theallocated plurality of scan task control blocks is a function of a totalnumber of processing units of the storage controller. The allocationlogic is further configured to assign an allocated scan task controlblock to a processing unit of the storage controller to scan an assignedportion of a directory data structure for subunits of storage for whichthere is data stored in cache. In one embodiment, the scan logic isfurther configured to scan the assigned portion of the directory datastructure for subunits of storage for which there is data stored incache using the assigned allocated scan task control block.

Implementations of the described techniques may include hardware, amethod or process, or computer software on a computer-accessible medium.Other features and aspects may be realized, depending upon theparticular application.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an embodiment of a computing environment employingdistributed safe data commit in a data storage system in accordance withone aspect of the present description.

FIG. 2 illustrates an example of a host in the computing environment ofFIG. 1.

FIG. 3 illustrates an example of distributed safe data commit operationsin accordance with one aspect of the present description.

FIG. 4 illustrates an example of distributed safe data commit logic inaccordance with one aspect of the present description.

FIG. 5 depicts an example of a known cache directory which has beensubdivided for distributed safe data commit operations in accordancewith one aspect of the present description.

FIG. 6 depicts an example of a known entry of the cache directory ofFIG. 5.

FIG. 7 illustrates an example of cache directory scan operations ofdistributed safe data commit operations in accordance with one aspect ofthe present description.

FIG. 8 illustrates an example of task control block allocationoperations of distributed safe data commit operations in accordance withone aspect of the present description.

FIG. 9 illustrates a computer embodiment employing distributed safe datacommit in a data storage system in accordance with the presentdescription.

DETAILED DESCRIPTION

As set forth above, a storage controller may exhibit an increase inresponse time for host initiated I/O operations which are initiatedduring prior safe data commit processes. In one aspect of the presentdescription, distributed safe data commit logic is configured to destagedata stored in a cache which has not yet been destaged to storage in amanner which can reduce the impact of safe data commit operations onresponse times of ongoing input/output operations of the host, cache andstorage. In one aspect of the present description, distributed safe datacommit logic manages the allocation of TCBs for the safe data commitprocess as a function of the type of TCB to be allocated for destagingand as a function of the identity of the RAID storage rank to which thedata is being destaged in a particular destage operation of the safedata commit process.

For example, in one embodiment, allocation of TCBs may be limited basedupon RAID storage rank to spread out the allocation of safe data commitprocess TCBs amongst the RAID storage ranks to reduce the impact of thesafe data commit process upon any one particular RAID storage rank. Incontrast, it is recognized herein that in a known prior safe data commitprocess, TCBs are not allocated by RAID storage rank but instead areallocated as a function of the locations of entries within the cachedirectory which indicate the presence of dirty data in the cache. As aresult, the allocation of TCBs in the known prior safe data commitprocess may not be spread out amongst the RAID storage ranks but insteadare spread out across the cache directory.

For example, in a known safe data commit process, the cache directory issubdivided for the safe data commit process so that each CPU is assigneda portion of the cache directory to scan for dirty data. The tracksrepresented in each cache directory portion are the result of particularhost input/output operations and background operations which caused datato be staged or destaged. Thus, each portion of the cache directorybeing scanned may represent tracks from one or more RAID storage ranks.Conversely, each RAID storage rank may have tracks represented in one ormore cache directory portions of the safe data commit process. As aresult, the allocation of TCBs resulting from the scan of each cachedirectory portion in the known prior safe data commit process may not bespread out amongst the RAID storage ranks but instead are spread outacross the cache directory by the subdivision of the cache directory forscanning without regard to limits for the RAID storage ranks.

In another aspect of the present description, distributed safe datacommit logic prioritizes the allocation of background TCBs over theallocation of foreground TCBs for destage operations of the safe datacommit process for a particular RAID storage rank.

Using a background TCB allocated to a requesting destage process, thesafe data commit destage operation to the particular RAID storage rankmay be completed. Because host-initiated read operations, for example,typically use foreground TCBs rather than background TCBs, increasingthe number of background TCBs being used for safe data commit destageoperations and decreasing the number of foreground TCBs being used forsafe data commit operations can reduce the impact of safe data commitoperations on the response times of host-initiated read operations.

In another aspect of the present description, the number of backgroundTCBs allocated to any one RAID storage rank is limited. For example, thenumber of background TCBs allocated may be limited by RAID storage ranktype, the faster RAID storage rank types receiving a higher limit thanslower RAID storage rank types, for example. By limiting the number ofbackground TCBs being allocated for safe data commit destage operationsdirected to a particular RAID storage rank, the impact on otheroperations such as host-initiated I/O operations directed to the sameRAID storage rank may be reduced.

In another aspect of the present description, once the limit ofbackground TCBs for a particular RAID storage rank is reached, thedistributed safe data commit logic switches to allocating foregroundTCBs instead of background TCBs so long as the number of background TCBsallocated to that RAID storage rank remains at the limit. In a mannersimilar to that of background TCBs, the number of foreground TCBsallocated to any one RAID storage rank is limited by the distributedsafe data commit logic. Again, the number of foreground TCBs allocatedmay be limited by RAID storage rank type, the faster RAID storage ranktypes receiving a higher limit than slower RAID storage rank types, forexample. Once the limit of foreground TCBs for a particular RAID storagerank is reached, the request for allocation of a foreground TCB isplaced in a queue. When a foreground TCB is deallocated making a newforeground TCB available for allocation, the foreground TCB request atthe front of the queue is awarded an available foreground TCB tocomplete the foreground TCB allocation. Using the foreground TCBallocated to the requesting destage process, the safe data commitdestage operation to the particular RAID storage rank may be completed.

It is appreciated that placing requests for allocation of foregroundTCBs in a foreground TCB queue can reduce the number of foreground TCBsavailable for host-initiated operations and thus can cause readoperations to slow down. However, because background TCBs areprioritized over foreground TCBs in distributed safe data commitallocations in one embodiment in accordance with the presentdescription, allocation of foreground TCBs may be deferred until thelimit for background TCBs has been reached. As a consequence, lowerpriority background operations may be slowed instead of higher priorityhost-initiated operations which utilize foreground TCBs. Thus, slowingof higher priority host-initiated operations may be reduced oreliminated, particularly during initial intervals in which the limitsimposed upon background TCB allocation have not been reached. Stillfurther, because limits on allocation of TCBs are imposed on a rank byrank basis, the impact of high rates of safe data commit destageoperations directed to particular RAID storage ranks which previouslycaused spikes in host-initiated operation response times may be reduced.Still further, limiting the allocation of TCBs on a rank by rank basiscan increase availability of TCBs for allocations for other RAID storageranks having lower rates of operations. Other aspects and advantages maybe realized, depending upon the particular application.

A system of one or more computers may be configured for distributed safedata commit in a data storage system in accordance with the presentdescription, by virtue of having software, firmware, hardware, or acombination of them installed on the system that in operation causes orcause the system to perform distributed safe data commit operations inaccordance with the present description. For example, one or morecomputer programs may be configured to perform distributed safe datacommit in a data storage system by virtue of including instructionsthat, when executed by data processing apparatus, cause the apparatus toperform the actions.

The operations described herein are performed by logic which isconfigured to perform the operations either automatically orsubstantially automatically with little or no system operatorintervention, except where indicated as being performed manually. Thus,as used herein, the term “automatic” includes both fully automatic, thatis operations performed by one or more hardware or software controlledmachines with no human intervention such as user inputs to a graphicaluser selection interface. As used herein, the term “automatic” furtherincludes predominantly automatic, that is, most of the operations (suchas greater than 50%, for example) are performed by one or more hardwareor software controlled machines with no human intervention such as userinputs to a graphical user selection interface, and the remainder of theoperations (less than 50%, for example) are performed manually, that is,the manual operations are performed by one or more hardware or softwarecontrolled machines with human intervention such as user inputs to agraphical user selection interface to direct the performance of theoperations.

Many of the functional elements described in this specification havebeen labeled as “logic,” in order to more particularly emphasize theirimplementation independence. For example, a logic element may beimplemented as a hardware circuit comprising custom VLSI circuits orgate arrays, off-the-shelf semiconductors such as logic chips,transistors, or other discrete components. A logic element may also beimplemented in programmable hardware devices such as field programmablegate arrays, programmable array logic, programmable logic devices or thelike.

A logic element may also be implemented in software for execution byvarious types of processors. A logic element which includes executablecode may, for instance, comprise one or more physical or logical blocksof computer instructions which may, for instance, be organized as anobject, procedure, or function. Nevertheless, the executables of anidentified logic element need not be physically located together, butmay comprise disparate instructions stored in different locations which,when joined logically together, comprise the logic element and achievethe stated purpose for the logic element.

Indeed, executable code for a logic element may be a single instruction,or many instructions, and may even be distributed over several differentcode segments, among different programs, among different processors, andacross several memory devices. Similarly, operational data may beidentified and illustrated herein within logic elements, and may beembodied in any suitable form and organized within any suitable type ofdata structure. The operational data may be collected as a single dataset, or may be distributed over different locations including overdifferent storage devices.

Implementations of the described techniques may include hardware, amethod or process, or computer software on a computer-accessible medium.FIG. 1 illustrates an embodiment of a computing environment employingdistributed safe data commit in a data storage system in accordance withthe present description. A plurality of hosts 1 a, 1 b . . . 1 n maysubmit Input/Output (I/O) requests over a network to one or more datastorage devices 2 to read or write data. The hosts 1 a, 1 b . . . 1 nmay be separate physical devices or may be virtual devices implementedusing assigned resources of partitions of a server, for example. In asimilar manner, the data storage device or devices 2 may be separatephysical devices or may be virtual devices implemented using assignedresources of partitions one or more servers, for example.

Each data storage device 2 includes a storage controller or control unit4 which accesses data stored in a plurality of data storage units ofstorage 6. Each data storage unit of the storage 6 may comprise anysuitable device capable of storing data, such as physical hard disks,solid state drives, etc., known in the art. Thus, in one embodiment, thestorage 6 may be comprised of one or more sequential access storagedevices, such as hard disk drives and magnetic tape or may includenon-sequential access storage devices such as solid state drives (SSD),for example. Each device of storage 6 may comprise a single sequentialor non-sequential access device for data storage or may comprise anarray of devices for data storage, such as a Just a Bunch of Disks(JBOD), Direct Access Storage Device (DASD), Redundant Array ofIndependent Disks (RAID) array, virtualization device, tape storage,flash memory, etc.

In certain embodiments, for example, storage units may be disks that areconfigured as a first type of Redundant Array of Independent Disk (RAID)storage ranks 8 a, . . . 8 n, in which each RAID storage rank is anarray of hard disks in a RAID configuration to facilitate data recoveryin the event of loss of a hard disk. The storage units of the storage 6may also include RAID storage ranks 10 a, . . . 10 n of a second type inwhich each RAID storage rank is an array of storage of another type suchas solid state drives in a RAID configuration to facilitate datarecovery in the event of loss of a solid state drive. The storage unitsof the storage 6 may be configured to store data in subunits of datastorage such as volumes, tracks, etc.

Each storage controller 4 includes a CPU complex 12 including processorresources provided by one or more processors or central processingunits, each having a single or multiple processor cores. In thisembodiment, a processor core contains the components of a CPU involvedin executing instructions, such as an arithmetic logic unit (ALU),floating point unit (FPU), and/or various levels of cache (such as L1and L2 cache), for example. It is appreciated that a processor core mayhave other logic elements in addition to or instead of those mentionedherein.

Each storage controller 4 further has a memory 20 that includes astorage manager 24 for managing storage operations including writingdata to or reading data from an associated storage 6 in response to anI/O data request from a host. A cache 28 of the memory 20 may compriseone or more of different types of memory, such as RAMs, write caches,read caches, NVS, etc. The different types of memory that comprise thecache may interoperate with each other. Writes from the hosts 1 a . . .1 n may initially be written to the cache 28 and then later destaged tothe storage 6. Read requests from the hosts 1 a . . . 1 n may besatisfied from the cache 28 if the corresponding information isavailable in the cache 28, otherwise the information is staged from thestorage 6 to the cache 28 and then provided to the requesting host 1 a .. . 1 n.

The memory 20 of the storage controller 4 includes a cache directory 30which identifies tracks having data stored in the cache 28 as a resultof a prestage or stage operation which transfers the data of a trackstored in the storage 6 to the cache 28, or as a result of a host writeoperation which writes data to the cache 28 for subsequent destaging tothe corresponding track or tracks of the storage 6. In the illustratedembodiment, and as explained in greater detail below in connection withFIG. 6, the cache directory 30 is implemented in the form of a knowndata structure which is a hash table of all tracks in cache 28. Eachtrack is hashed into a slot of the cache directory 30 which includes atrack identification (ID) and an indication as to whether the data ofthe track is “dirty”, that is, has not yet been safely destaged to thecorresponding track of the storage 6. Multiple tracks hashed into a slotare linked together. It is appreciated that a suitable cache directorymay be implemented using other types of data structures.

Operations including I/O operations of the storage manager 24, includingstage, prestage and destage operations, for example, utilize TaskControl Blocks (TCBs) 32 of the memory 20. Each TCB is a data structurein the operating system kernel containing the information needed tomanage a particular process. Storage controllers may move information toand from storage, and to and from the cache by using TCBs to manage themovement of data. When a write request issues from a host to a storagecontroller, a TCB may be allocated from the operating system code. TheTCB is used to maintain information about the write process frombeginning to end as data to be written is passed from the host throughthe cache to the storage. If the cache is full, the TCB may be queueduntil existing data in the cache can be destaged (i.e., written tostorage), in order to free up space.

As previously noted, TCBs may be classified on the basis of the taskbeing controlled by the particular TCB. For example, a “background” TCBis a TCB that controls an operation which is not directly related to ahost input/output operation. Another type of TCB is a “foreground” TCBthat controls an operation which is directly related to a hostinput/output operation.

The storage manager 24 further includes distributed safe data commitlogic 40 which periodically scans the cache directory 30 for dirty datato be destaged to storage 6. The safe data commit process permits anoperator to be assured that anything written to cache 28 prior to thesafe data commit scan start time has been successfully destaged andsafely stored on the storage 6.

It is recognized herein that prior safe data commit processes may causea significant increase in response time for host initiated I/Ooperations which are initiated during a safe data commit process. Asexplained in greater detail below, the distributed safe data commitlogic 40 manages the allocation of TCBs during the safe data commitprocess in a manner which can reduce or eliminate substantial impact bythe safe data commit process upon host initiated I/O operations.

In the illustrated embodiment, the storage manager 24 including thedistributed safe data commit logic 40, is depicted as software stored inthe memory 20 and executed by the CPU complex 12. However, it isappreciated that the logic functions of the storage manager 24 may beimplemented as hardware, software, firmware or combinations of one ormore thereof, depending upon the particular application.

The storage manager 24 (FIG. 1) in one embodiment may store data in thecache 28 and transfer data between the cache 28 and storage 6 in tracks.As used herein, the term track may refer to a subunit of data or storageof a disk storage unit, a solid state storage unit or other types ofstorage units. In addition to tracks, storage units may have othersubunits of storage or data such as a bit, byte, word, segment, page,block (such as a Logical Block Address (LBA)), cylinder, segment,extent, volume, logical device, etc. or any portion thereof, or othersubunits suitable for transfer or storage. Accordingly, the size ofsubunits of data processed in safe data commit processes in accordancewith the present description may vary, depending upon the particularapplication. Thus, as used herein, the term “track” refers to anysuitable subunit of data storage or transfer.

The system components 1 a, 1 b . . . 1 n, 4, 6 are connected to anetwork which enables communication among these components. Thus, thenetwork includes a fabric which may comprise a Storage Area Network(SAN), Local Area Network (LAN), Intranet, the Internet, Wide AreaNetwork (WAN), peer-to-peer network, wireless network, arbitrated loopnetwork, etc. Communication paths from the storage subsystems to thehosts 1 a, 1 b, . . . 1 n may be based upon a particular host attachmentprotocol such as Fibre Connection (FICON), for example. Othercommunication paths of the fabric may comprise for example, a FibreChannel arbitrated loop configuration, a serial loop architecture or abus interface, such as a Peripheral Component Interconnect (PCI)interface such as a PCI-Express interface. The communication paths ofthe fabric may also be part of an Ethernet network, for example, suchthat each node has an individual network (internet protocol) address.Other types of communication paths may be utilized, such as a modemtelephone path, wireless network, etc., depending upon the particularapplication.

Communication software associated with the communication paths includesinstructions and other software controlling communication protocols andthe operation of the communication hardware in accordance with thecommunication protocols, if any. It is appreciated that othercommunication path protocols may be utilized, depending upon theparticular application.

A typical host as represented by the host 1 a of FIG. 2 includes a CPUcomplex 202 and a memory 204 having an operating system 206 and anapplication 208 that cooperate to read data from and write data updatesto the storage 6 via a storage controller 4. An example of a suitableoperating system is the z/OS operating system. It is appreciated thatother types of operating systems may be employed, depending upon theparticular application.

FIG. 3 depicts one example of operations of a distributed safe datacommit process in accordance with one aspect of the present description.In this example, upon initiating (block 304) a safe data commit process,safe data commit logic such as the logic 40 (FIG. 1) allocates (block308) TCBs for the safe data commit process as a function of TCB type andRAID storage rank. In one embodiment, background TCBs are prioritizedover foreground TCBs to reduce impact on host-initiated I/O operations.In addition, the number of foreground and background TCBs allocated toeach RAID storage rank is limited to reduce impact on I/O operationsdirected to particular RAID storage ranks. Using TCBs allocated in thismanner, data which has not yet been destaged to storage is destaged(block 310) from cache to storage. If is determined (block 312) that thesafe data commit process has not yet been completed, TCBs continue to beallocated (block 308) until the process is complete (block 318). Asexplained in greater detail below, allocation of TCBs for safe datacommit processes in this manner can reduce the impact of such safe datacommit processes upon host-initiated I/O operations, reducing oreliminating increases in response times caused by the safe data commitprocesses.

FIG. 4 depicts one embodiment of the distributed safe data commit logic40 of a data storage device 2 (FIG. 1) in greater detail. In thisembodiment, the distributed safe data commit logic 40 (FIG. 3) isconfigured to destage data stored in the cache 28 (FIG. 1) which has notyet been destaged for storage to an associated subunit of storage of aunit of storage, in a manner which can reduce the impact of safe datacommit operations on response time of ongoing input/output operations ofthe host and cache. In one aspect of the present description, thedistributed safe data commit logic 40 manages the allocation of TCBs forthe safe data scan process as a function of both the type of TCB to beallocated for destaging and as a function of the identity of the RAIDstorage rank to which the data is being destaged in a particular destageoperation of the safe data commit process. As previously mentioned, inone embodiment, background TCBs are prioritized over foreground TCBs andthe number of background and foreground TCBs allocated to each RAIDstorage rank is limited to reduce impact on other I/O operationsdirected to RAID storage ranks.

The distributed safe data commit logic 40 (FIG. 4) includes scan logic404 configured to identify a subunit of storage such as a track, forexample, for which there is data stored in cache 28 (FIG. 1) which hasnot yet been destaged for storage to the associated track or othersubunit of storage of a unit of storage such as a RAID storage rank, forexample. As explained in greater detail below, the distributed safe datacommit logic 40 (FIG. 4) further includes allocation logic 408, destagelogic 412 and a foreground TCB queue memory 420.

In the illustrated embodiment, the scan logic 404 is configured to scana cache directory which identifies tracks having data stored in thecache as a result of a prestage or stage operation which transfers thedata of a track stored in the storage to the cache, or as a result of ahost write operation which writes data to the cache for subsequentdestaging to the corresponding track or tracks of the storage. FIG. 5depicts an example of a suitable known cache directory 30 which isimplemented in the form a hash table of all tracks in the cache 28 (FIG.1). Each track is hashed into an entry or slot of the cache directory.

FIG. 6 depicts in greater detail an example of a known hash table entry,designated SlotA1 (FIGS. 5, 6), in this example, of the cache directory30 (FIG. 5). In this embodiment, each slot or entry of the cachedirectory 30, as represented by the entry SlotA1 in FIGS. 5, 6, has aplurality of fields including a Track ID field 602 (FIG. 6) whichidentifies for a track or extent of tracks having data stored in thecache 28 and hashed in that particular entry, the location or locationsof the track or tracks within the storage 6 (FIG. 1). In one embodiment,the Track ID field 602 (FIG. 6) identifies in addition to other storagelocation information, the particular RAID storage rank 8 a . . . 8 n or10 a . . . 10 n (FIG. 1) storing the track or tracks of a cachedirectory entry such as the entry SlotA1 of the cache directory 30. Theother storage location information identified by the Track ID field 602for the track or tracks hashed by the particular slot or entry of thecache directory may include a device identification, a logical blockaddress, a track number and other location address or identificationinformation for the track or tracks to which the cache directory entryis directed.

As shown in FIG. 6, each slot or entry of the cache directory 30 furtherincludes a “Cache Location” field 604 which identifies the location orlocations within the cache 28 in which the data of the track or tracksto which the cache directory entry is directed, are stored. In addition,a “Dirty Data Flag” field 606, indicates whether the data stored in thecache for the track or tracks to which the cache directory entrypertains has been modified by a write operation as compared to originaldata which may be currently stored in the storage location or locationsidentified by the Track ID field of the cache directory entry. Aspreviously mentioned “dirty” data is data stored in the cache that hasnot yet been safely destaged to the corresponding track of the storage.Multiple tracks hashed into a single slot or entry may be linkedtogether by one or both of the Track ID field 602 and the Cache Locationfield 604.

The scan logic 404 (FIG. 4) is configured to scan the cache directory 30(FIG. 5) to identify a subunit of storage such as a track or tracks, forexample, for which there is data stored in cache 28 (FIG. 1) which hasnot yet been destaged for storage in the associated track, tracks orother subunit of storage of a unit of storage such as a RAID storagerank, for example. FIG. 7 depicts in greater detail, one example of acache directory scan operation of a safe data commit operation by thescan logic 404 together with the allocation logic 408 of the distributedsafe data commit logic 40 (FIG. 4). The allocation logic 408 isconfigured to allocate (block 704, FIG. 7) a plurality of scan taskcontrol blocks for the plurality of processing units of the storagecontroller 4. As previously mentioned, in this embodiment, the CPUcomplex 12 (FIG. 1) of the storage controller 4 may have a plurality ofprocessors or central processing units, each having a single or multipleprocessor cores. In this embodiment, the total number of scan taskcontrol blocks allocated (block 704) by the allocation logic 408 is afunction of the total number of processing units of the storagecontroller 4. For example, if the CPU complex 12 has N processing units,the allocation logic 408 may allocate N scan TCBs for the cachedirectory scan of the safe data commit process. Thus, in one embodiment,the same number N of scan TCBs may be allocated as the number N ofprocessing units of the CPU complex 12. It is appreciated that thenumber scan TCBs which are allocated may differ from the number ofprocessing units of the CPU complex 12, depending upon the particularapplication.

In this embodiment, the cache directory 30 (FIG. 5) may be subdividedfor the cache directory scan operation into portions or “chunks” as afunction of the total number of processing units of the storagecontroller 4. For example, if the CPU complex 12 has N processing units,the allocation logic 408 may subdivide the cache directory 30 for thecache directory scan of the safe data commit process, into N chunks orportions, the same number N as the number of processing units of the CPUcomplex 12. In the example of FIG. 5, the cache directory 30 has beensubdivided into N chunks or portions represented by chunks ChunkA,ChunkB . . . ChunkN. The portion ChunkA has a plurality of slots orentries SlotA1, SlotA2 . . . SlotAn, the portion ChunkB has a pluralityof slots or entries SlotB1, SlotB2 . . . SlotBn, etc. with the portionChunkN having a plurality of slots or entries SlotN1, SlotN2 . . .SlotNn as shown in FIG. 5. In one embodiment, the number of slots orentries in each chunk of the cache directory 30 may be substantiallyequal or may vary from chunk to chunk, depending upon the particularapplication.

Having allocated (block 704, FIG. 7) the scan TCBs for the cachedirectory scan and having subdivided the cache directory 30 (FIG. 5)into chunks, the allocation logic 408 (FIG. 4) may assign (block 708,FIG. 7) an allocated scan task control block to a processing unit of thestorage system to scan an assigned portion or chunk of the cachedirectory 30. In this manner, the entire cache directory 30 may bescanned by the N processing units in parallel, each processing unitscanning an assigned chunk or portion of the cache directory in parallelwith the other processing units.

As explained in greater detail in connection with FIG. 8, the scan logic404 (FIG. 4) is configured to cause each processing unit to scan anassigned portion or chunk of the cache directory for tracks or othersubunits of storage for which there is data stored in cache, using theassigned allocated scan task control block. The allocation logic 408(FIG. 4) is configured to determine (block 712, FIG. 7) whether such ascan operation of a cache directory portion is complete. If not, theallocation logic 408 (FIG. 4) is further configured to determine (block716, FIG. 7) whether all the scan TCBs which were allocated (block 704)are in use. If not, another allocated scan TCB may be assigned (block708, FIG. 7) to a processing unit of the storage system to scan anassigned portion or chunk of the cache directory 30. If all allocatedscan TCBs are determined (block 716) to be in use, the entire cachedirectory 30 may be scanned by the N processing units in parallel, eachprocessing unit scanning an assigned chunk or portion of the cachedirectory in parallel with the other processing units.

If it is determined (block 712) that the scanning of a chunk or portionof the cache directory 30 has been completed, that scan TCB may bereleased (block 720) by the allocation logic 408. The allocation logic408 (FIG. 4) is further configured to determine (block 724, FIG. 7)whether all scan operations of the cache directory have been completedsuch that all cache directory chunks or portions have been scanned. Ifnot, the allocation logic 408 (FIG. 4) is further configured todetermine (block 716, FIG. 7) whether all the scan TCBs which wereallocated (block 704) are in use and assigning (block 708) unusedallocated scan TCBs. Once it is determined (block 724) that the scan ofthe cache directory is complete. the scan TCBs may be deallocated by theallocation logic 408.

FIG. 8 depicts in greater detail one example of operations by the scanlogic 404 (FIG. 4), the allocation logic 408 and the destage logic 412of the distributed safe data commit logic 40 in the scanning of anassigned portion or chunk of the cache directory 30 (FIG. 5), allocatingTCBs and destaging modified data of tracks or other subunits to storage,in a safe data commit process in accordance with the presentdescription. In one operation, the scan logic 404 is configured toexamine (block 804, FIG. 8) a slot or other entry of the cache directoryportion being scanned. Thus, a central processing unit using an assignedscan TCB, may examine the entry SlotA1 (FIG. 5), for example, of thecache directory portion ChunkA, for example, which has been assigned tothat central processing unit. One or more other central processing unitsmay concurrently examine slots of other assigned chunks of the cachedirectory 30 in parallel with the scanning, allocation and destagingoperations depicted in the example of FIG. 8 for the cache directorychunk ChunkA.

The scan logic 404 in examining a slot of the assigned chunk of thecache directory, is further configured to identify (block 808, FIG. 8) atrack or other subunit of storage for which there is modified datastored in cache 28 which has not yet been destaged for storage. Thus, acentral processing unit using an assigned scan TCB, may determine (block808) if the entry SlotA1 being examined within the cache directoryportion ChunkA indicates whether the data of the associated track asidentified by the Track ID field 602 (FIG. 6) has been modified asindicated by the dirty data flag field 606 of the entry SlotA1 beingexamined. If it is determined (block 808, FIG. 8) that the entry beingexamined does not indicate that the associated track stored in cache 28contains dirty data, the scan logic 404 examines (block 804, FIG. 8) thenext entry of the cache directory 30 in sequence. In one embodiment, theentries of the particular chunk of the cache directory 30 may beexamined in a sequential order defined by the Track ID fields 602 (FIG.6) or by the cache location fields 604 or other suitable fields of theentries of the cache directory 30. It is appreciated that the particularsequential order of examining entries of the cache directory may vary,depending upon the particular application.

Examining (block 804, FIG. 8) of the entries of the cache directorychunks continue until (block 810) all entries of the cache directorychunk have been examined or until a cache directory entry indicatingmodified data is identified (block 808, FIG. 8). Upon identifying (block808, FIG. 8) a track or other subunit of storage for which there ismodified data stored in cache 28 which has not yet been destaged tostorage, the allocation logic 408 (FIG. 4) is configured to identify(block 812, FIG. 8) the particular RAID storage rank or other storageunit storing the track having modified data in the cache 28. Aspreviously mentioned, the particular RAID storage rank or storage unitfor the track having modified data may be identified by the Track IDfield 602 of the entry such as the entry SlotA1 of FIG. 6, for example.In this example, the track identified as having modified data asindicated by the dirty data flag field 606, may be found in the RAIDstorage rank 8 a (FIG. 1), for example of the RAID storage ranks 8 a . .. 8 n, 10 a . . . 10 n of the storage 6 of FIG. 1. Thus, the Track IDfield 602 identifies the RAID storage rank 8 a as the particular storageunit containing the track identified as having modified data stored inthe cache 28. In the embodiment of FIG. 8, the term “unit of storage” asused herein refers to a RAID storage rank or RAID storage array ofstorage devices and the term “subunit of storage” refers to a track ofthe RAID rank of storage devices. It is appreciated that safe datacommit operations in accordance with the present description may beperformed in connection with other types of storage units and othertypes of storage subunits.

Having identified (block 812, FIG. 8) the particular RAID storage rankor other storage unit for the track identified as having modified data,the allocation logic 408 (FIG. 4) is further configured to allocate atask control data structure of a first type such as a background TCB,for example, to destage the data of the identified track to theidentified RAID storage rank or other identified storage unit, if thetotal number of the control data structures of the first type (e.g.background TCBs) allocated to the identified unit of storage (e.g.identified RAID storage rank) of the identified subunit of storage (e.g.identified track) remains within a limit imposed for the total number ofcontrol data structures of the first type (e.g. background TCBs)allocated to the identified unit of storage (e.g. identified RAIDstorage rank). As previously mentioned, a “background” TCB is a TCB thatcontrols an operation which is not directly related to a hostinput/output operation. Thus. one example of a background TCB inaccordance with the present disclosure, is a TCB which controls adestage operation as a background operation or as a safe data commitdestage operation not required as part of a particular host I/Ooperations.

In the embodiment of FIG. 8 in which a unit of storage is a RAID storagerank and a subunit of storage is a track of a RAID storage rank, theallocation logic 408 is configured to determine (block 816, FIG. 8)whether the safe data commit limit for background TCBs which has beenallocated for the identified RAID storage rank, would be exceeded by theallocation of an additional background TCB directed to that particularRAID storage rank of the track identified as having modified data storedin the cache. If not, an additional background TCB is allocated (block820) by the allocation logic 408 for the destage task of the safe datacommit process. The destage logic 412 (FIG. 4) is configured to destage(block 824, FIG. 8) using the allocated background or other allocatedTCB, the modified data of the identified track from the cache locationof the cache 28 as identified by the cache location field 604 (FIG. 6)of the cache directory entry being examined, to the appropriate track ofthe identified RAID storage rank as identified by the Track ID field 602(FIG. 6) of the cache directory entry being examined. Upon completion ofthe destaging operation, the allocation logic 408 is further configuredto deallocate (block 828, FIG. 8) the background TCB allocated for thedestage operation, for use by another background or safe data commitoperation. Also, once a background TCB is deallocated by the safe datacommit process, it no longer counts against the safe data commit limitof background TCBs imposed upon a particular RAID storage rank duringthe safe data commit process.

Alternatively, if it is determined (block 816, FIG. 8) that the safedata commit limit for background TCBs which has been allocated for tasksdirected to the identified RAID storage rank, would be exceeded by theallocation of an additional background TCB directed to that particularRAID storage rank of the track identified as having modified data storedin the cache, the allocation logic 408 is further configured to allocatea task control data structure of a second type (e.g. a foreground TCB)to destage the data of the identified subunit (e.g. track) of storage tothe identified unit of storage (e.g. identified RAID storage rank). Aspreviously mentioned, a “foreground” TCB is typically a TCB thatcontrols an operation which is directly related to a host input/outputoperation. For example, a foreground TCB may be allocated to perform adestage or stage operation on behalf of host I/O operation. In oneaspect of the present description, a foreground TCB may also beallocated for a destage operation of the safe data commit process if thelimit on background TCBs for a particular RAID storage rank has beenreached. Thus, in the embodiment of FIG. 8, if it is determined (block816, FIG. 8) that the safe data commit limit for background TCBs whichhave been allocated for the identified RAID storage rank, would beexceeded by the allocation of an additional background TCB directed tothat particular RAID storage rank, the allocation logic 408 isconfigured to initiate (block 832. FIG. 8) allocation of a foregroundTCB by requesting allocation of a foreground TCB for the particular RAIDstorage rank.

In one aspect of the present description, the allocation logic 408 isfurther configured to impose a limit on the allocation of foregroundTCBs for each RAID storage rank or other storage unit, in connectionwith the safe data commit process. Thus, the allocation logic 408determines (block 836, FIG. 8) whether a predetermined limit on theallocation of foreground TCBs has been reached for the RAID storage rankidentified by the track entry of the cache directory being examined. Ifthe allocation logic 408 does determine (block 836, FIG. 8) that thelimit on the allocation of foreground TCBs has been reached for theparticular RAID storage rank of the cache directory entry beingexamined, the allocation logic 408 is further configured to place therequest (block 832) for allocation of the foreground task control blockin a foreground allocation request queue maintained for that particularRAID storage rank in the queue memory 420 (FIG. 4) wherein the requestwaits (block 844) until the foreground allocation request reaches thehead of the foreground allocation request queue maintained by theallocation logic 408 for the particular RAID storage rank.

Upon completion of a destaging operation (block 824) using a foregroundTCB, the allocation logic 408 is further configured to deallocate (block828, FIG. 8) the foreground TCB allocated for the destage operation, foruse by another I/O operation or safe data commit operation. Also, once aforeground TCB is deallocated by the safe data commit process, it nolonger counts against the safe data commit limit of foreground TCBsimposed upon a particular RAID storage rank during the safe data commitprocess.

The allocation logic 408 is further configured to advance eachforeground allocation request a position within the foregroundallocation request queue for a particular RAID storage rank each timethe allocation logic 408 deallocates (block 828, FIG. 8) a foregroundTCB allocated for a completed destage operation directed to theidentified RAID storage rank, and completes (block 852 FIG. 8) theallocation of a requested foreground TCB allocation which has reachedthe head of the queue for the identified RAID storage rank. Accordingly,once it is determined (block 848, FIG. 8) that a foreground allocationrequest has reached the head of the foreground allocation request queuemaintained for the particular RAID storage rank, the allocation logic408 completes (block 852, FIG. 8) the allocation of the requestedforeground TCB at the head of the queue for the destage task of the safedata commit process directed to the particular RAID storage rank. Inthis manner, the requested foreground TCB awaits allocation andexecution until the request reaches the head of the queue.

The destage logic 412 (FIG. 4) is configured to destage (block 824, FIG.8) using the allocated foreground TCB, the modified data of theidentified track from the cache location of the cache 28 as identifiedby the cache location field 604 (FIG. 6) of the cache directory entrybeing examined to the appropriate track of the identified RAID storagerank as identified by the Track ID field 602 (FIG. 6) of the cachedirectory entry being examined. Upon completion of the destagingoperation, the allocation logic 408 is further configured to deallocate(block 828, FIG. 8) the foreground TCB allocated for the destageoperation, for use by another I/O operation or a safe data commitoperation as described above. Upon deallocation (block 828, FIG. 8) aforeground TCB allocated for a destage operation directed to aparticular RAID storage rank, the allocation logic 408 advances eachforeground allocation request a position within the foregroundallocation request queue for that particular RAID storage rank.

However, in the event that the allocation logic 408 determines (block836, FIG. 8) that the limit on the allocation of foreground TCBs has notbeen reached for the particular RAID storage rank of the cache directoryentry being examined, the allocation logic 408 proceeds directly tocomplete (block 852, FIG. 8) the allocation of the requested foregroundTCB allocation, and the destage logic 412 destages (block 824, FIG. 8)the modified data of the identified track as described above. Inaddition, the allocation logic 408 deallocates (block 828, FIG. 8) theforeground TCB allocated for the safe data commit process directed tothe particular RAID storage rank upon completion of the destagingoperation.

Once it is determined (block 712, FIG. 7, block 810, FIG. 8) that allentries of the cache directory portion have been examined as describedabove, the distributed safe data commit logic 40 returns (block 860,FIG. 8) to release (block 720, FIG. 7) the scan TCB allocated forscanning the cache directory portion. As described above, allocationlogic 408 (FIG. 4) further determines (block 724, FIG. 7) whether allscan operations of the cache directory have been completed such that allcache directory chunks or portions have been scanned. If not, theallocation logic 408 (FIG. 4) further determines (block 716, FIG. 7)whether all the scan TCBs which were allocated (block 704) are in useand assigns (block 708) any unused allocated scan TCBs. Once it isdetermined (block 724) that the scan of the cache directory is complete.the scan TCBs may be deallocated (block 730, FIG. 7) by the allocationlogic 408.

It is seen from the above that in one aspect of distributed safe datacommit operations in accordance with the present description, a maximumnumber of background TCBs are initially allocated instead of foregroundTCBs. It is recognized that the allocation of background TCBs by thesafe data commit process may slow background operations but it isrecognized herein that slowing of background operations instead of hostI/O operations may be advantageous in many applications. Accordingly, asbackground TCBs are allocated instead of foreground TCBs for aparticular RAID storage rank up to a predetermined limit, the impact ofthe safe data commit operations upon host-initiated I/O operations suchas read operations may be reduced or eliminated.

In this manner, allocation of foreground TCBs which may slow host I/Ooperations, may be deferred until the predetermined limit for backgroundTCBs is reached. However, because the allocation of foreground TCBs to aparticular RAID storage array is also limited to a predetermined limit,the impact of allocation of foreground TCBs upon host I/O may be reducedas well. It is appreciated that other features may be realized,depending upon the particular application.

The computational components of the figures may each be implemented inone or more computer systems, such as the computer system 1002 shown inFIG. 9. Computer system/server 1002 may be described in the generalcontext of computer system executable instructions, such as programmodules, being executed by a computer system. Generally, program modulesmay include routines, programs, objects, components, logic, datastructures, and so on that perform particular tasks or implementparticular abstract data types. Computer system/server 1002 may bepracticed in distributed cloud computing environments where tasks areperformed by remote processing devices that are linked through acommunications network. In a distributed cloud computing environment,program modules may be located in both local and remote computer systemstorage media including memory storage devices.

As shown in FIG. 9, the computer system/server 1002 is shown in the formof a general-purpose computing device. The components of computersystem/server 1002 may include, but are not limited to, one or moreprocessors or processing units 1004, a system memory 1006, and a bus1008 that couples various system components including system memory 1006to processor 1004. Bus 1008 represents one or more of any of severaltypes of bus structures, including a memory bus or memory controller, aperipheral bus, an accelerated graphics port, and a processor or localbus using any of a variety of bus architectures. By way of example, andnot limitation, such architectures include Industry StandardArchitecture (ISA) bus, Micro Channel Architecture (MCA) bus, EnhancedISA (EISA) bus, Video Electronics Standards Association (VESA) localbus, and Peripheral Component Interconnects (PCI) bus.

Computer system/server 1002 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 1002, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 1006 can include computer system readable media in theform of volatile memory, such as random access memory (RAM) 1010 and/orcache memory 1012. Computer system/server 1002 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 1013 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 1008 by one or more datamedia interfaces. As will be further depicted and described below,memory 1006 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 1014, having a set (at least one) of program modules1016, may be stored in memory 1006 by way of example, and notlimitation, as well as an operating system, one or more applicationprograms, other program modules, and program data. Each of the operatingsystem, one or more application programs, other program modules, andprogram data or some combination thereof, may include an implementationof a networking environment. The components of the computer system 1002may be implemented as program modules 1016 which generally carry out thefunctions and/or methodologies of embodiments of the invention asdescribed herein. The system of FIG. 1 may be implemented in one or morecomputer systems 1002, where if they are implemented in multiplecomputer systems 1002, then the computer systems may communicate over anetwork.

Computer system/server 1002 may also communicate with one or moreexternal devices 1018 such as a keyboard, a pointing device, a display1020, etc.; one or more devices that enable a user to interact withcomputer system/server 1002; and/or any devices (e.g., network card,modem, etc.) that enable computer system/server 1002 to communicate withone or more other computing devices. Such communication can occur viaInput/Output (I/O) interfaces 1022. Still yet, computer system/server1002 can communicate with one or more networks such as a local areanetwork (LAN), a general wide area network (WAN), and/or a publicnetwork (e.g., the Internet) via network adapter 1024. As depicted,network adapter 1024 communicates with the other components of computersystem/server 1002 via bus 1008. It should be understood that althoughnot shown, other hardware and/or software components could be used inconjunction with computer system/server 1002. Examples, include, but arenot limited to: microcode, device drivers, redundant processing units,external disk drive arrays, RAID systems, tape drives, and data archivalstorage systems, etc.

The reference characters used herein, such as i, j, and n, are used todenote a variable number of instances of an element, which may representthe same or different values, and may represent the same or differentvalue when used with different or the same elements in differentdescribed instances.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out processoroperations in accordance with aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The terms “an embodiment”, “embodiment”, “embodiments”, “theembodiment”, “the embodiments”, “one or more embodiments”, “someembodiments”, and “one embodiment” mean “one or more (but not all)embodiments of the present invention(s)” unless expressly specifiedotherwise.

The terms “including”, “comprising”, “having” and variations thereofmean “including but not limited to”, unless expressly specifiedotherwise.

The enumerated listing of items does not imply that any or all of theitems are mutually exclusive, unless expressly specified otherwise.

The terms “a”, “an” and “the” mean “one or more”, unless expresslyspecified otherwise.

Devices that are in communication with each other need not be incontinuous communication with each other, unless expressly specifiedotherwise. In addition, devices that are in communication with eachother may communicate directly or indirectly through one or moreintermediaries.

A description of an embodiment with several components in communicationwith each other does not imply that all such components are required. Onthe contrary a variety of optional components are described toillustrate the wide variety of possible embodiments of the presentinvention.

When a single device or article is described herein, it will be readilyapparent that more than one device/article (whether or not theycooperate) may be used in place of a single device/article. Similarly,where more than one device or article is described herein (whether ornot they cooperate), it will be readily apparent that a singledevice/article may be used in place of the more than one device orarticle or a different number of devices/articles may be used instead ofthe shown number of devices or programs. The functionality and/or thefeatures of a device may be alternatively embodied by one or more otherdevices which are not explicitly described as having suchfunctionality/features. Thus, other embodiments of the present inventionneed not include the device itself.

The foregoing description of various embodiments of the invention hasbeen presented for the purposes of illustration and description. It isnot intended to be exhaustive or to limit the invention to the preciseform disclosed. Many modifications and variations are possible in lightof the above teaching. It is intended that the scope of the invention belimited not by this detailed description, but rather by the claimsappended hereto. The above specification, examples and data provide acomplete description of the manufacture and use of the composition ofthe invention. Since many embodiments of the invention can be madewithout departing from the spirit and scope of the invention, theinvention resides in the claims herein after appended.

What is claimed is:
 1. A computer program product for use with a host and a data storage device having a plurality of processing units, task control data structures, a cache, a cache directory and a plurality of units of storage in which each unit of storage has a plurality of subunits of storage, wherein the computer program product comprises a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor of the data storage device to cause processor operations, the processor operations comprising: identifying a subunit of storage for which there is data stored in cache which has not yet been destaged for storage to the subunit of storage of a unit of storage; identifying the unit of storage of the identified subunit of storage; allocating a task control data structure of a first type to destage the data of the identified subunit of storage to the unit of storage if a total of the task control data structures of the first type allocated to the identified unit of storage of the identified subunit of storage remains within a limit imposed for a total of task control data structures of the first type allocated to the identified unit of storage; and allocating a task control data structure of a second type to destage the data of the identified subunit of storage to the unit of storage if a total of the task control data structures of the first type allocated to the identified unit of storage of the identified subunit of storage has reached the limit imposed for a total of task control data structures of the first type allocated to the identified unit of storage.
 2. The computer program product of claim 1 wherein the unit of storage is a RAID array of storage devices and the subunit of storage is a track of the RAID array of storage devices.
 3. The computer program product of claim 1 wherein the task control data structure of the first type is a background task control block (TCB) unassociated with host input/output operations and wherein the task control data structure of the second type is a foreground task control block (TCB) associated with host input/output operations.
 4. The computer program product of claim 1 wherein the operations further comprise destaging data stored in the cache to the identified subunit of storage of the identified unit of storage using the allocated task control data structure, and deallocating the allocated task control data structure in association with completion of destaging data stored in the cache to the identified subunit of storage of the identified unit of storage using the allocated task control data structure.
 5. The computer program product of claim 1 wherein the allocating a task control data structure of a second type to destage the data of the identified subunit of storage to the unit of storage, includes placing a request for allocation of a task control data structure of the second type in a queue to await execution if a total of the task control data structures of the second type allocated to the identified unit of storage of the identified subunit of storage has reached a limit imposed for a total of task control data structures of the second type allocated to the identified unit of storage.
 6. The computer program product of claim 1 wherein the operations further comprise: allocating a plurality of scan task control blocks for a plurality of processing units of a storage system wherein a total of the allocated plurality of scan task control blocks is a function of a total number of processing units of the storage system; and assigning an allocated scan task control block to a processing unit of the storage system to scan an assigned portion of a directory data structure for subunits of storage for which there is data stored in cache which has not yet been destaged for storage to the subunit of storage of a unit of storage wherein identifying a subunit of storage for which there is data stored in cache which has not yet been destaged for storage includes scanning the assigned portion of the directory data structure for subunits of storage for which there is data stored in cache using the assigned allocated scan task control block.
 7. A storage controller for use with a plurality of units of storage in which each unit of storage has a plurality of subunits of storage, comprising: a cache; and distributed safe data commit logic configured to destage data stored in the cache which has not yet been destaged for storage to an associated subunit of storage of a unit of storage, the distributed safe data commit logic including: scan logic configured to identify a subunit of storage for which there is data stored in cache which has not yet been destaged for storage to the associated subunit of storage of a unit of storage; and allocation logic configured to identify the unit of storage of the identified subunit of storage and to allocate a task control data structure of a first type to destage the data of the identified subunit of storage to the unit of storage if a total of the task control data structures of the first type allocated to the identified unit of storage of the identified subunit of storage remains within a limit imposed for a total of task control data structures of the first type allocated to the identified unit of storage, and to allocate a task control data structure of a second type to destage the data of the identified subunit of storage to the unit of storage if a total of the task control data structures of the first type allocated to the identified unit of storage of the identified subunit of storage has reached the limit imposed for a total of task control data structures of the first type allocated to the identified unit of storage.
 8. The storage controller of claim 7 wherein the unit of storage is a RAID array of storage devices and the subunit of storage is a track of the RAID array of storage devices.
 9. The storage controller of claim 7 wherein the task control data structure of the first type is a background task control block (TCB) and wherein the task control data structure of the second type is a foreground task control block (TCB).
 10. The storage controller of claim 7 wherein the distributed safe data commit logic further includes destage logic configured to destage data stored in the cache to the identified subunit of storage of the identified unit of storage using the allocated task control data structure, and wherein the allocation logic is further configured to deallocate the allocated task control data structure in association with completion of destaging data stored in the cache to the identified subunit of storage of the identified unit of storage using the allocated task control data structure.
 11. The storage controller of claim 7 wherein the allocation logic further includes a queue memory configured to store a queue of requests for allocation of task control data structures of the second type and wherein the allocation logic is further configured to place requests for allocation of task control data structure in the queue memory to await execution if a total of the task control data structures of the second type allocated to the identified unit of storage of the identified subunit of storage has reached a limit imposed for a total of task control data structures of the second type allocated to the identified unit of storage.
 12. The storage controller of claim 7 further comprising a plurality of processing units and wherein the allocation logic is further configured to allocate a plurality of scan task control blocks for the plurality of processing units of the storage controller wherein a total of the allocated plurality of scan task control blocks is a function of a total number of processing units of the storage controller, and to assign an allocated scan task control block to a processing unit of the storage controller to scan an assigned portion of a directory data structure for subunits of storage for which there is data stored in cache wherein the scan logic is further configured to scan the assigned portion of the directory data structure for subunits of storage for which there is data stored in cache using the assigned allocated scan task control block.
 13. A method for use with a plurality of units of storage in which each unit of storage has a plurality of subunits of storage, comprising: identifying a subunit of storage for which there is data stored in cache which has not yet been destaged for storage to the subunit of storage of a unit of storage; identifying the unit of storage of the identified subunit of storage; allocating a task control data structure of a first type to destage the data of the identified subunit of storage to the unit of storage if a total of the task control data structures of the first type allocated to the identified unit of storage of the identified subunit of storage remains within a limit imposed for a total of task control data structures of the first type allocated to the identified unit of storage; and allocating a task control data structure of a second type to destage the data of the identified subunit of storage to the unit of storage if a total of the task control data structures of the first type allocated to the identified unit of storage of the identified subunit of storage has reached the limit imposed for a total of task control data structures of the first type allocated to the identified unit of storage.
 14. The method of claim 13 wherein the unit of storage is a RAID array of storage devices and the subunit of storage is a track of the RAID array of storage devices.
 15. The method of claim 13 wherein the task control data structure of the first type is a background task control block (TCB) unassociated with host input/output operation and wherein the task control data structure of the second type is a foreground task control block (TCB) associated with host input/output operation.
 16. The method of claim 13 further comprising destaging data stored in the cache to the identified subunit of storage of the identified unit of storage using the allocated task control data structure, and deallocating the allocated task control data structure in association with completion of destaging data stored in the cache to the identified subunit of storage of the identified unit of storage using the allocated task control data structure.
 17. The method of claim 13 wherein the allocating a task control data structure of a second type to destage the data of the identified subunit of storage to the unit of storage, includes placing a request for allocation of a task control data structure of the second type in a queue to await execution if a total of the task control data structures of the second type allocated to the identified unit of storage of the identified subunit of storage has reached a limit imposed for a total of task control data structures of the second type allocated to the identified unit of storage.
 18. The method of claim 13 further comprising: allocating a plurality of scan task control blocks for a plurality of processing units of a storage system wherein a total of the allocated plurality of scan task control blocks is a function of a total number of processing units of the storage system; and assigning an allocated scan task control block to a processing unit of the storage system to scan an assigned portion of a directory data structure for subunits of storage for which there is data stored in cache which has not yet been destaged for storage to the subunit of storage of a unit of storage wherein identifying a subunit of storage for which there is data stored in cache which has not yet been destaged for storage includes scanning the assigned portion of the directory data structure for subunits of storage for which there is data stored in cache using the assigned allocated scan task control block. 